<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"  
      xmlns:h="http://java.sun.com/jsf/html"  
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"  
      xmlns:p="http://primefaces.org/ui"> 
    <h:head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <link rel="stylesheet" type="text/css" href="format.css" />
        <title>Facelets Template</title>
    </h:head>
    <h:body>
        <ui:composition template="template.xhtml">
            <ui:define name="ui_right">
                <h:form>
                    
                
		<p:panel id="panel" header="Logowanie do portalu" rendered="#{userLoginBean.loginStatus == null}">
				<p:messages for="login"/>
		<h:panelGrid columns="2" columnClasses="column" cellpadding="5">
		<h:outputText value="Login"/>
		<p:inputText value="#{userLoginBean.user.login}"/>

		<h:outputText value="Hasło"/>
		<p:password value="#{userLoginBean.user.password}"/>

                            <p:commandButton value="Potwierdź"  action="#{userLoginBean.tryLogin}" ajax="false"/>

		</h:panelGrid>
		</p:panel>
			<p:panel id="panelNiet" rendered="#{userLoginBean.loginStatus != null}">　
				<h:outputText value="Jesteś już zalogowany!"/>
			</p:panel>
		</h:form>
            </ui:define>
        </ui:composition>
    </h:body>
</html>
